#include <iostream>
#define UNICODE 1
#include <windows.h>
#include <deque>
#include <string>
#include <boost/timer/timer.hpp>
#include <limits>
#include <cstdint>
using namespace std;
using namespace boost;

/*
3GHZ 2core cb 0.012s 0.005s

*/

int main()
{
    try{
        int e=32423;
        throw e;
    }catch(int e){
        cout<<e<<endl;
    }
    //cout<<numeric_limits<uint32_t>::max()<<endl;
    cout<<int(numeric_limits<uint8_t>::max())<<endl;
	WIN32_FIND_DATA FindFileData;
	HANDLE hFind;

	//wchar_t *path=L"D:\\TDDOWNLOAD\\*.*";
	wchar_t *path=L"C:\\windows\\system32\\*.*";
	{
		timer::auto_cpu_timer t;
		hFind = FindFirstFile(path, &FindFileData);
	}
	if (hFind == INVALID_HANDLE_VALUE)
	{
		wprintf (L"Invalid File Handle. GetLastError reports %d\n",
			GetLastError ());
		return (0);
	}
	else
	{
		deque<wstring> files;
		{
			timer::auto_cpu_timer t;
			do
			{
				//wprintf (L"The first file found is %s\n", FindFileData.cFileName);
				files.push_back(wstring((wchar_t*)FindFileData.cFileName));
			}while(FindNextFile(hFind,&FindFileData));
		}
		wprintf(L"%d",files.size());
		FindClose(hFind);
		return (1);
	}
    return 0;
}
